#include "std.h"
#include "gui_init.h"

static void on_quit(int signal)
{
    int ret;
    printf("[%s]: on quit\n",__FUNCTION__);
    ret = gui_release();
    if(ret < 0)
    {
        printf("[%s]: gui_release failed with:%x\n",__FUNCTION__,ret);
    }

    exit(0);
}

int main(int argc,char* argv[])
{
    signal(SIGINT,on_quit);
    signal(SIGQUIT,on_quit);
    signal(SIGTERM,on_quit);

    int ret;
    gui_cfg_t cfg;

    cfg.vo_dev = 0;
    cfg.vo_intf_type = OT_VO_INTF_HDMI;
    cfg.vo_intf_sync = OT_VO_OUT_1080P60;
    cfg.vo_bg_color = 0x0000FF;
    sprintf(cfg.fb_normal_path,"%s","/dev/fb0");
    //sprintf(cfg.fb_mouse_path,"%s","/dev/fb2");

    ret = gui_init(&cfg);
    if(ret < 0)
    {
        printf("[%s]: gui_init failed with:%x\n",__FUNCTION__,ret);
        return -1;
    }

    while(1)
    {
        sleep(1);
    }
    return 0;
}
